package com.zupig.customnotifi;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.gitonway.lee.niftynotification.lib.Effects;
import com.gitonway.lee.niftynotification.lib.NiftyNotificationView;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {
    private Effects effects;
    protected Button btn1;
    protected Button btn2;
    protected Button btn3;
    protected Button btn4;
    protected Button btn5;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.setContentView(R.layout.activity_main);
        initView();
    }

    @Override
    public void onClick(View view) {
        if (view.getId() == R.id.btn1) {
            effects = Effects.flip;
        } else if (view.getId() == R.id.btn2) {
            effects = Effects.jelly;
        } else if (view.getId() == R.id.btn3) {
            effects = Effects.scale;
        } else if (view.getId() == R.id.btn4) {
            effects = Effects.slideIn;
        }else if (view.getId() == R.id.btn5){
            effects = Effects.standard;
        }
       /* Configuration config = new Configuration.Builder()
                .setAnimDuration(500)
                .setBackgroundColor("#ffffff")
                .setViewHeight(50)
                .build();*/
      /*  NiftyNotificationView.build(MainActivity.this,"身份公开共和国两个两个",effects,R.id.rl,config)
                .setIcon(R.mipmap.ic_launcher)
                .show();*/
        NiftyNotificationView.build(MainActivity.this,"身份公开共和国两个两个",effects,R.id.rl)
                .setIcon(R.mipmap.ic_launcher)
                .show();
    }

    private void initView() {
        btn1 = (Button) findViewById(R.id.btn1);
        btn1.setOnClickListener(MainActivity.this);
        btn2 = (Button) findViewById(R.id.btn2);
        btn2.setOnClickListener(MainActivity.this);
        btn3 = (Button) findViewById(R.id.btn3);
        btn3.setOnClickListener(MainActivity.this);
        btn4 = (Button) findViewById(R.id.btn4);
        btn4.setOnClickListener(MainActivity.this);
        btn5 = (Button) findViewById(R.id.btn5);
        btn5.setOnClickListener(MainActivity.this);
    }
}
